<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"
	import="java.util.*,com.pub.database.*"%>
<% response.setHeader("Cache.Control","no-cache"); 
response.setHeader("Pragma","no-cache"); 
response.setHeader("Expires","0");%>

<jsp:useBean id="action" scope="request"
	class="swd.deploy.menu_tree_maintain.Action" />
<jsp:useBean id="view" scope="request"
	class="swd.deploy.menu_tree_maintain.View" />
<jsp:setProperty name="view" property="*" />
<%
	ArrayList<ArrayList<Object>> altDeptList = new ArrayList<ArrayList<Object>>();
	ArrayList<Object> altDeptListData = new ArrayList<Object>();
	ArrayList<Object> altTopDept = new ArrayList<Object>();
%>

<%if (action.action(pageContext).equals("login")) {return;} %>
<jsp:useBean id="DataView" scope="request"
	type="com.pub.database.DataView" />
<!-- 以下為DataView 共用設定 -->
<jsp:useBean id="DataViewForm" scope="request"
	type="com.pub.database.DataViewForm" />
<jsp:setProperty name="DataViewForm" property="submitMethod"
	value="POST" />
<jsp:setProperty name="DataViewForm" property="pageRowCount" value="0" />
<jsp:setProperty name="DataViewForm" property="nowPageNum" />
<jsp:setProperty name="DataViewForm" property="dataViewAction" />
<jsp:setProperty name="DataViewForm" property="filterCol" />
<jsp:setProperty name="DataViewForm" property="filterValue" />
<jsp:setProperty name="DataViewForm" property="dvOrderByFields" />
<jsp:setProperty name="DataViewForm" property="dvOrderBySeq" />
<!-- DataView 設定結束 -->

<%

   ResourceBundle lrbdWEB_Config = ResourceBundle.getBundle("WEB_Config",Locale.getDefault());

   QueryBean qbnDA1 = new QueryBean(lrbdWEB_Config.getString("DB_ALIAS"),
                                    Boolean.valueOf(lrbdWEB_Config.getString("DEBUG")).booleanValue(),
                                    lrbdWEB_Config.getString("SOURCE_CHARSET"), lrbdWEB_Config.getString("TARGET_CHARSET"));

   String  strTree="";
   String  strLink="";

try{
     StringBuffer stbSQL=new StringBuffer("select type_name,type_id,type_up,floor,type_status,seqno,url,rownum-1 qty,flag,sys_no,type_name_e");
     stbSQL.append(" from (select distinct type_name,type_id,type_up,level as floor,type_status,seqno,url,flag,sys_no,type_name_e ");
     stbSQL.append(" from wkf_menu where sys_no='" + (view.getsys_no()!=null ? view.getsys_no() : "") + "' ");
     stbSQL.append(" start with type_id in (select distinct type_id  from wkf_menu ");
     stbSQL.append("                         where sys_no='" + (view.getsys_no()!=null ? view.getsys_no() : "") + "'");
     stbSQL.append("                           and type_up='foldersTree')");
    stbSQL.append("  connect by prior type_id = type_up order by flag,seqno)");

     altDeptList=qbnDA1.querySQL(stbSQL.toString());

     // Title
//     altTopDept=(ArrayList)qbnDA1.querySQL("select 'Project_Query', 'BTS' from dual").get(0);
%>

<html>
<head>
<title><%=view.getPrgTitle()%></title>
<LINK HREF="/SWD/workflow.css" REL="STYLESHEET" TYPE="TEXT/CSS">
<script type="text/javascript" language="javascript1.2"
	src="/PUBPAGE/general/commscript.js"></script>
<SCRIPT LANGUAGE="javascript1.2" type="" SRC="/SWD/general/swd.js"></SCRIPT>
<script language="javascript" type="" src="/SWD/general/treeua.js"></script>
<script language="javascript" type="" src="/SWD/general/treeftiens4.js"></script>
</head>
<script language="javascript" type="">
     USETEXTLINKS = 1;
     STARTALLOPEN = 0;
     ICONPATH='/SWD/pub_images/menutree/';
     USEICONS = 0;
     foldersTree = gFld('','');

     var folderObj;

      <%
        if(altDeptList!=null && !altDeptList.isEmpty()){
          for(int i=0;i<altDeptList.size();i++){
             altDeptListData=((ArrayList<Object>)altDeptList.get(i));
             strTree = "<table  width='750px' border=0><tr ONMOUSEOVER=this.className='td_content_over' ONMOUSEOUT=this.className='td_content'>" +
                       // 刪除鍵
                       "<td class='td_content'WIDTH='5%' align='center' >" +
                       "<INPUT class='button b_normal' TYPE='BUTTON' " +
                          " onclick='javascript:deleteTree(" + altDeptListData.get(7).toString() + ");'" +
                          " NAME='del' VALUE='刪' />" +
                       "</td>" +
                       // 程式中文名稱
                       "<td width='20%' CLASS='td_content'>" +
                       "<INPUT TYPE='text' size='25' name='type_name_g' CLASS='input' " +
                          " onchange='javascript:saveRowSn(" + altDeptListData.get(7).toString() + ");' " +
                          " VALUE='" + altDeptListData.get(0).toString() + "' />" +
                       "</font></td>" +
                       // 程式編號
                       "<td class='td_content' nowrap WIDTH='6%'  >" +
                       "<a target='_blank' href='/SWD/pages/maintain/project/grpprg_right_maintain.jsp?prg_no=" + altDeptListData.get(1).toString() + "'>" + altDeptListData.get(1).toString() + "</a>" +
                       "</td>" +
                       // 序號
                       "<td class='td_content'WIDTH='5%' align='center' >" +
                       "<INPUT TYPE='text' size='4' name='seqno_g' CLASS='input' " +
                          " onchange='javascript:saveRowSn(" + altDeptListData.get(7).toString() + ");' " +
                          " VALUE='" + altDeptListData.get(5).toString() + "' />" +
                       "</td>"  +
                       // 種類
                       "<td class='td_content'WIDTH='10%' align='center' >" +
                       "<SELECT CLASS='select' NAME='type_status_g' " +
                          " onchange='javascript:saveRowSn(" + altDeptListData.get(7).toString() + ");'>" +
                          " <option value='C' " + (altDeptListData.get(4).toString().equals("C") ? "selected" : "") + ">目錄</option>" +
                          " <option value='P' " + (altDeptListData.get(4).toString().equals("P") ? "selected" : "") + ">程式</option>" +
                          " <option value='O' " + (altDeptListData.get(4).toString().equals("O") ? "selected" : "") + ">外掛</option>" +
                          " <option value='D' " + (altDeptListData.get(4).toString().equals("D") ? "selected" : "") + ">文件</option>" +
                          " <option value='N' " + (altDeptListData.get(4).toString().equals("N") ? "selected" : "") + ">停用</option>" +
                       "</td>" +
                       // URL
                       "<td class='td_content'WIDTH='30%'  >" +
                       "<INPUT TYPE='text' size='45' name='url_g' CLASS='input' " +
                          " onchange='javascript:saveRowSn(" + altDeptListData.get(7).toString() + ");' " +
                          " VALUE='" + altDeptListData.get(6).toString() + "' />" +
                       "</td>" ;

                       // 新增鍵 取消新增鍵
                       /*
                       if (altDeptListData.get(4).toString().equals("C")){

                          strTree +="<td class='td_content'WIDTH='5%' align='center' >" +
                                    "<INPUT class='button b_normal' TYPE='BUTTON' " +
                                    " onclick='javascript:fc_add_new(" + altDeptListData.get(7).toString() + ");'" +
                                    " NAME='new' VALUE='新' />" +
                                    "</td>";
                       } else {
                          strTree +="<td class='td_content'WIDTH='5%' align='center' >&nbsp;</td>";
                       }
                       */
                       // 其它
             strTree +="<INPUT TYPE='hidden' name='type_id_g' VALUE='" + altDeptListData.get(1).toString() + "' />" +
                       "<INPUT TYPE='hidden' name='flag_g' VALUE='" + altDeptListData.get(8).toString() + "' />" +
                       "<INPUT TYPE='hidden' name='sys_no_g' VALUE='" + altDeptListData.get(9).toString() + "' />" +
                       "<INPUT TYPE='hidden' name='type_name_e_g' VALUE='" + altDeptListData.get(10).toString() + "' />" +
                       "<INPUT TYPE='hidden' name='type_up_g' VALUE='" + altDeptListData.get(2).toString() + "' />" +
                       "<INPUT TYPE='hidden' name='rownum_g' VALUE='" + altDeptListData.get(7).toString() + "' />" +
                       "</tr></table>";

             if(altDeptListData.get(3).toString().equals("1")){
             //第一層樹狀圖
                out.println("SWD" + altDeptListData.get(1).toString() + "=insFld(foldersTree,gFld(\"" + strTree + "\",\"" + "\"));");
             } else{
             //第二層以上樹狀圖
                out.println("SWD" + altDeptListData.get(1).toString() + "=insFld(SWD" + altDeptListData.get(2).toString() + ", gFld(\"" + strTree + "\",\"" + "\"));");
             }
          }
        }
      %>

      // 只展第一層
      function openFirstLevel(){
          for (i=0; i < foldersTree.nChildren; i++)
              clickOnNodeObj(foldersTree.children[i])
      }

      // 展開所有的目錄
      function expandTree(folderObj){
          var childObj;
          var i;
          for (i=0; i < folderObj.nChildren; i++){
              clickOnNodeObj(folderObj.children[i])
              childObj = folderObj.children[i]
              if (typeof childObj.setState != "undefined") {
                  expandTree(childObj);
              }
          }
      }

      function goRightForm(v_link){
        //開啟視窗
        parent.right.location.href=v_link;
      }

      function saveRowSn(rowsn){
         if (document.all.item('sys_count').value=='1'){
           saveRowSnData(rowsn);
         } else {
            for (i=0;i<document.all.item('rownum_g').length;i++){
               if (rowsn==document.all.item('rownum_g')[i].value){
                  saveRowSnData(i);
               }
            }
         }
      }

      function saveRowSnData(rowsn){
         if(document.all.item('rowsn').value.indexOf(rowsn)>-1){
            return;//已記錄過就不再記錄了
         }
         if(document.all.item('rowsn').value==''){
           document.all.item('rowsn').value=rowsn;
         } else{
           document.all.item('rowsn').value=document.all.item('rowsn').value + ',' + rowsn;
         }
      }

      function deleteTree(rowsn){
         saveRowSn(rowsn);
         document.all.item('prgAction').value='delete';
         document.forms[0].submit();
      }

      // 取得程式編號
      function fc_get_prg_data(){
            ret=window.showModalDialog("/SWD/pages/pub/find_wkf_prg.jsp","_blank",
                    "status:no;dialogHeight:550px;dialogLeft:center;dialogTop:center;dialogWidth:500px");
            if(ret==null){return;}
            val=ret.split(',,,,,');
            document.all.item('type_id').value=val[0];
            document.all.item('type_name').value=val[1];
            document.all.item('type_name_e').value=val[2];
      }

      function fc_check_to_query(){
      // 檢查是否已經有變動，如有變動則不能查詢
         if (document.all.item('prgAction').value!='null'){
            if(document.all.item('rowsn').value!=''){
               alert("資料已有變動，請先存檔後再查詢!!");
               return;
            }
         }
         document.all.item('prgAction').value='query';
         document.forms[0].submit();
      }

      function fc_add_new(rowsn){
        // 檢查是否已經有變動，如有變動則不能查詢
         if (document.all.item('prgAction').value!='null'){
            if(document.all.item('rowsn').value!=''){
               alert("資料已有變動，請先存檔後再新增!!");
               return;
            }
         }
         // 更新自己
         if (document.all.item('sys_count').value=='1'){
            reload.href="menu_tree_maintain.jsp?prgAction=add_new&sys_no=" + document.all.item('sys_no_g').value +
                                                "&type_up=" + document.all.item('type_id_g').value;
         } else {
            reload.href="menu_tree_maintain.jsp?prgAction=add_new&sys_no=" + document.all.item('sys_no_g')[rowsn].value +
                                                "&type_up=" + document.all.item('type_id_g')[rowsn].value;
         }
         reload.click();
      }

      function fc_save_before_check(){
         // 系統編號
         if (document.all.item('sys_no').value==""){
            alert("系統編號沒有值!!");
            return;
         }

         // 上層編號
         if (document.all.item('type_up').value==""){
            alert("上層編號沒有值!!");
            return;
         }

         // 序號
         if (document.all.item('seqno').value==""){
            alert("序號沒有值!!");
            return;
         }

         // 程式編號
         if (document.all.item('type_id').value==""){
            alert("程式編號沒有值!!");
            return;
         }

         // 程式中文名稱
         if (document.all.item('type_name').value==""){
            alert("程式中文名稱沒有值!!");
            return;
         }

         document.all.item('prgAction').value='save';
         document.forms[0].submit();
      }
</script>
<body bgcolor="#ffffff" onload="<%=view.getOnloadScript()%>">
<TABLE BORDER="0" HEIGHT="20" CELLPADDING="0" CELLSPACING="0">
	<TR>
		<TD BACKGROUND="/SWD/pub_images/title_bg.gif">
		<DIV ALIGN="LEFT"><IMG SRC="/SWD/pub_images/title01.gif"
			WIDTH="18" HEIGHT="24" HSPACE="0" alt="" /><IMG
			SRC="/SWD/pub_images/glass.gif" WIDTH="12" HEIGHT="8" alt="" /></DIV>
		</TD>
		<TD ALIGN="LEFT" HEIGHT="20" VALIGN="MIDDLE"
			BACKGROUND="/SWD/pub_images/title_bg.gif" CLASS="TITLE"><%=view.getPrgTitle()%></TD>
		<TD BACKGROUND="/SWD/pub_images/title_bg.gif">
		<DIV ALIGN="RIGHT"><IMG SRC="/SWD/pub_images/glass.gif"
			WIDTH="12" HEIGHT="8" alt="" /><IMG SRC="/SWD/pub_images/title02.gif"
			WIDTH="18" HEIGHT="24" HSPACE="0" alt="" /></DIV>
		</TD>
	</TR>
</TABLE>
<br />
<form action="<%=request.getRequestURI() %>" method="POST"
	name="menu_tree_maintain">
<table BORDER="0" WIDTH="540px" CELLSPACING="1" CELLPADDING="0">
	<!-- 更新自己 start -->
	<tr>
		<td><a id="reload" style="display: none">reload...</a></td>
	</tr>
</table>
<TABLE BORDER="0" CELLSPACING="1" CELLPADDING="0" WIDTH="540px">
	<TR>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnAddTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:document.all.item('prgAction').value='add';document.forms[0].submit();" /></TD>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnSaveTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:fc_save_before_check();" /></TD>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnQueryTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:fc_check_to_query();" /></TD>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnExitTitle()%>" CLASS="button b_normal"
			onClick="document.location.href='menu_tree_maintain.jsp'" /></TD>
		<TD width="80%" CLASS="td_content">&nbsp;</TD>
	</TR>
	<TR>
		<TD colspan=5><font color="red"><%=(view.getTipMessage()!=null ? "工作提示:"+ view.getTipMessage() : "")%></font>
		</TD>
	</TR>
</TABLE>


<table BORDER="0" WIDTH="540px" CELLSPACING="1" CELLPADDING="0">
	<TR>
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.getsys_noTitle()%></TD>
		<TD colspan="3" WIDTH="85%" CLASS="td_content"><INPUT
			TYPE="TEXT" NAME="sys_no" SIZE="8" MAXLENGTH="8"
			VALUE="<%=(view.getsys_no()!=null ? view.getsys_no() : "")%>"
			<%=view.getsys_no_readonly() ? "readonly" : "onDblClick=\"javascript:fc_get_sys_data(this);\""%>
			CLASS="<%=(view.getsys_no_readonly() ? "input_noborder" : "input_window hand")%>" />
		<INPUT TYPE="Hidden" NAME="prgAction" SIZE="25" MAXLENGTH="40"
			VALUE="<%=(view.getPrgAction()!=null ? view.getPrgAction() : "")%>"
			readonly /> <INPUT TYPE="Hidden" NAME="prgStatus"
			VALUE="<%=(view.getPrgStatus()!=null ? view.getPrgStatus() : "")%>"
			readonly /></TD>
	</TR>

	<TR style="">
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.gettype_upTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="type_up" SIZE="25" MAXLENGTH="40"
			VALUE="<%=(view.gettype_up()!=null ? view.gettype_up() : "")%>"
			<%=view.gettype_up_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.gettype_up_readonly() ? "input_noborder" : "input")%>" />
		</TD>
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.getseqnoTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="seqno" SIZE="4" MAXLENGTH="4"
			VALUE="<%=(view.getseqno()!=null ? view.getseqno() : "")%>"
			<%=view.getseqno_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.getseqno_readonly() ? "input_noborder" : "input")%>" />
		</TD>
	</TR>
	<TR style="">
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.gettype_idTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="type_id" SIZE="25" MAXLENGTH="40"
			VALUE="<%=(view.gettype_id()!=null ? view.gettype_id() : "")%>"
			<%=view.gettype_id_readonly() ? "readonly" : "onDblClick=\"javascript:fc_get_prg_data();\""%>
			CLASS="<%=(view.gettype_id_readonly() ? "input_noborder" : "input_window hand")%>" />
		</TD>
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.gettype_statusTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><SELECT NAME="type_status"
			SIZE="1"
			onfocus="javascript:if(<%=view.gettype_status_readonly()%>==1){this.blur();}"
			CLASS="select">
			<OPTION VALUE="C"
				<%if(view.gettype_status() !=null){out.print((view.gettype_status().equals("C") ? "selected" : ""));}%>>目錄</OPTION>
			<OPTION VALUE="P"
				<%if(view.gettype_status() !=null){out.print((view.gettype_status().equals("P") ? "selected" : ""));}%>>程式</OPTION>
			<OPTION VALUE="O"
				<%if(view.gettype_status() !=null){out.print((view.gettype_status().equals("O") ? "selected" : ""));}%>>外掛</OPTION>
			<OPTION VALUE="D"
				<%if(view.gettype_status() !=null){out.print((view.gettype_status().equals("D") ? "selected" : ""));}%>>文件</OPTION>
			<OPTION VALUE="N"
				<%if(view.gettype_status() !=null){out.print((view.gettype_status().equals("N") ? "selected" : ""));}%>>停用</OPTION>
		</SELECT></TD>
	</TR>

	<TR style="">
		<TD nowrap WIDTH="15%" CLASS="td_head"><IMG
			SRC="/SWD/pub_images/star.gif" WIDTH="10" HEIGHT="10" HSPACE="2"
			alt="" /><%=view.gettype_nameTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="type_name" SIZE="25" MAXLENGTH="50"
			VALUE="<%=(view.gettype_name()!=null ? view.gettype_name() : "")%>"
			<%=view.gettype_name_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.gettype_name_readonly() ? "input_noborder" : "input")%>" />
		</TD>
		<TD nowrap WIDTH="15%" CLASS="td_head"><%=view.gettype_name_eTitle()%></TD>
		<TD WIDTH="35%" CLASS="td_content"><INPUT TYPE="TEXT"
			NAME="type_name_e" SIZE="30" MAXLENGTH="50"
			VALUE="<%=(view.gettype_name_e()!=null ? view.gettype_name_e() : "")%>"
			<%=view.gettype_name_e_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.gettype_name_e_readonly() ? "input_noborder" : "input")%>" />
		</TD>
	</TR>

	<TR style="">
		<TD nowrap WIDTH="15%" CLASS="td_head"><%=view.geturlTitle()%></TD>
		<TD WIDTH="85%" CLASS="td_content" colspan="3"><INPUT
			TYPE="TEXT" NAME="url" SIZE="80" MAXLENGTH="255"
			VALUE="<%=(view.geturl()!=null ? view.geturl() : "")%>"
			<%=view.geturl_readonly() ? "readonly" : ""%>
			CLASS="<%=(view.geturl_readonly() ? "input_noborder" : "input")%>" />
		</TD>
	</TR>
	<tr>
		<td colspan="4"><%=view.getNoteLine1Title()%></td>
	</tr>
	<tr>
		<td colspan="4"><%=view.getNoteLine2Title()%></td>
	</tr>
</table>

<INPUT TYPE="HIDDEN" NAME="type_path" SIZE="75,05" MAXLENGTH="300"
	VALUE="<%=(view.gettype_path()!=null ? view.gettype_path() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="type_desc" SIZE="75,05" MAXLENGTH="100"
	VALUE="<%=(view.gettype_desc()!=null ? view.gettype_desc() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="type_dept" SIZE="8" MAXLENGTH="8"
	VALUE="<%=(view.gettype_dept()!=null ? view.gettype_dept() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="type_mgr" SIZE="8" MAXLENGTH="8"
	VALUE="<%=(view.gettype_mgr()!=null ? view.gettype_mgr() : "")%>" /> <INPUT
	TYPE="HIDDEN" NAME="type_stdate" SIZE="19" MAXLENGTH="19"
	VALUE="<%=(view.gettype_stdate()!=null ? view.gettype_stdate() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="type_eddate" SIZE="19" MAXLENGTH="19"
	VALUE="<%=(view.gettype_eddate()!=null ? view.gettype_eddate() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="sec_lev" SIZE="1" MAXLENGTH="1"
	VALUE="<%=(view.getsec_lev()!=null ? view.getsec_lev() : "")%>" /> <INPUT
	TYPE="HIDDEN" NAME="sec_ctl" SIZE="1" MAXLENGTH="1"
	VALUE="<%=(view.getsec_ctl()!=null ? view.getsec_ctl() : "")%>" /> <INPUT
	TYPE="HIDDEN" NAME="app_empno" SIZE="8,10" MAXLENGTH="8"
	VALUE="<%=(view.getapp_empno()!=null ? view.getapp_empno() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="flow_send" SIZE="1" MAXLENGTH="1"
	VALUE="<%=(view.getflow_send()!=null ? view.getflow_send() : "")%>" />
<INPUT TYPE="HIDDEN" NAME="flowAction" VALUE="<%=view.getFlowAction()%>" />
<INPUT TYPE="HIDDEN" NAME="flowStatus" VALUE="<%=view.getFlowStatus()%>" />
<INPUT TYPE="HIDDEN" NAME="flag" VALUE="<%=view.getflag()%>" /> <input
	type="hidden" name="rowsn" value="" /> <input type="hidden"
	name="sys_count"
	value="<%=(view.getsys_count()!=null ? view.getsys_count() : "0")%>" />

<TABLE BORDER="0" WIDTH="540px" CELLSPACING="1" CELLPADDING="0" style="">
	<tr>
		<TD style="" width="5%" CLASS="td_content"><INPUT TYPE="BUTTON"
			VALUE="<%=view.getBtnSaveAllTitle()%>" CLASS="button b_normal"
			ONCLICK="javascript:document.all.item('prgAction').value='saveall';document.forms[0].submit();" /></TD>
	</tr>
	<tr>
		<td>
		<% //DataView.OutputDataView(DataViewForm, pageContext);%>
		</td>
	</tr>
</TABLE>
<span STYLE=""> <a href="http://www.treemenu.net/"
	target="main_frame">km</a> </span>


<table width='750px'>
	<tr class='td_head_grid' align='center'>
		<td valign='top' WIDTH='8%' align='center'></td>
		<td valign='top' WIDTH='20%'>程式中文名稱</td>
		<td valign='top' nowrap WIDTH='6%'>程式編號</td>
		<td valign='top' WIDTH='8%' align='center'>序號</td>
		<td valign='top' WIDTH='10%' align='center'>種類</td>
		<td valign='top' WIDTH='35%'>URL</td>
	</tr>
</table>
<%if(altTopDept!=null || altDeptList!=null){out.println("<script>initializeDocument()</script>");}%>

<!--<script>expandTree(foldersTree)</script>--> <script>openFirstLevel()</script>
</form>
</body>
</html>
<%
}catch(Exception e){
  e.printStackTrace();
}finally{
     if(altDeptList!=null){
       altDeptListData.clear();
       altDeptList.clear();
     }

     if(altTopDept!=null){
       altTopDept.clear();
     }

     altDeptListData=null;
     altDeptList=null;
     altTopDept=null;

     lrbdWEB_Config=null;
     try{qbnDA1.close();}catch(Exception e){System.out.println("cant close querybean in action.java");}
     qbnDA1=null;
}
%>
